export function getPropertyValue<T, K extends keyof T>(obj: T, key: K): T[K] {
  return obj[key];
}

export function elvis(object: any, path: string) {
  return path
    ? path.split('.').reduce(function (value, key) {
        return value && value[key];
      }, object)
    : object;
}
